<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>私教明细</title>
    <meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0.maximum-scale=1.0,user-scalable=no" name="viewport">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/bossIndex.css">
    <link rel="stylesheet" href="css/flexible.css">
    <link rel="stylesheet" href="css/vant.css">
    <script src="js/vue/vue.js"></script>
    <script src="js/vue/axios.js"></script>
    <script src="js/jquery.md5.js"></script>
    <script src="js/vue/vant.js"></script>
    <script src="js/glabe.js"></script>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/fontsize.js"></script>
    <style>
        table tr th{
            font-size: 14px;
        }
        table tr td{
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="hd_table" id="app">
    <div style="white-space: nowrap;">
        <table>
            <thead>
            <tr>
                <th>团课名称</th>
                <th>上课时间</th>
                <th>教练</th>
                <th>消费用卡</th>
                <th>消费额</th>
                <th>签到时间</th>
            </tr>
            </thead>
            <tbody>
                <template v-for="item in attendance">
                    <tr v-if="item.Currtype == 1">
                        <td>{{item.Ctitle}}</td>
                        <td>{{item.Bstime}}</td>
                        <td>{{item.Sname}}</td>
                        <td>{{item.Cardname}}</td>
                        <td>{{item.Charge}}</td>
                        <td>{{item.Signtime}}</td>
                    </tr>
                </template>
            </tbody>
        </table>
    </div>
</div>
</body>
<script>
var app = new Vue({
    el: '#app',
    data: {
        //会员id
        id:null,
        //出勤信息
        attendance:null
    },
    created() {
        //获取路由参数
        let id = getUrlQueryString('id');
        this.id = id;
        //获取入场列表
        axios.get(`mobileapi/boss/user.php?act=attend&uid=${id}&type=2`).then(res=>{
            if(res.data.code == 200){
                this.attendance = res.data.data.list;
            }else{
                vant.Toast(res.data.msg);
            }
        }).catch(err=>{
            vant.Toast('请求发送失败，请重试');
        });
    },
    methods: {
        
    },
})
</script>
</html>